package com.lin.controller.publish;

import com.lin.base.Result;
import com.lin.entity.ProjectDetail;
import com.lin.entity.ProjectOutside;
import com.lin.security.util.SecurityUtil;
import com.lin.service.ProjectDetailService;
import com.lin.service.ProjectOutsideService;
import org.springframework.beans.BeanUtils;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Created by Lin Weihong
 * @date on 2022/4/16 21:36
 */
@RestController
@RequestMapping("/api/publish")
public class PublishProjectController {

    @Resource
    ProjectOutsideService projectOutsideService;


    @PostMapping("/project")
    public Result publish(@RequestBody @Validated ProjectOutside projectOutside) {
        projectOutsideService.publishProject(projectOutside);
        return Result.ok("发布成功");
    }



}
